#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "ControlNode.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Behavior;
class ObjectFlow;

/// <summary>
/// DecisionNode
/// A DecisionNode is a ControlNode that chooses between outgoing ActivityEdges for
/// the routing of tokens.
/// </summary>
class UMLMODEL_EXPORT DecisionNode : public ControlNode {

public: // Constructors and destructors
    explicit DecisionNode(const QString& umlType="uml::DecisionNode");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// decisionInput getter
    /// A Behavior that is executed to provide an input to guard ValueSpecifications on
    /// ActivityEdges outgoing from the DecisionNode.
    /// </summary>
    shared_ptr<Behavior> decisionInput() const;

    /// <summary>
    /// decisionInput setter
    /// A Behavior that is executed to provide an input to guard ValueSpecifications on
    /// ActivityEdges outgoing from the DecisionNode.
    /// </summary>
    void setDecisionInput(shared_ptr<Behavior> value);

    /// <summary>
    /// decisionInputFlow getter
    /// An additional ActivityEdge incoming to the DecisionNode that provides a decision
    /// input value for the guards ValueSpecifications on ActivityEdges outgoing from
    /// the DecisionNode.
    /// </summary>
    shared_ptr<ObjectFlow> decisionInputFlow() const;

    /// <summary>
    /// decisionInputFlow setter
    /// An additional ActivityEdge incoming to the DecisionNode that provides a decision
    /// input value for the guards ValueSpecifications on ActivityEdges outgoing from
    /// the DecisionNode.
    /// </summary>
    void setDecisionInputFlow(shared_ptr<ObjectFlow> value);

private: // Fields
    /// <summary>
    /// decisionInput
    /// A Behavior that is executed to provide an input to guard ValueSpecifications on
    /// ActivityEdges outgoing from the DecisionNode.
    /// </summary>
    shared_ptr<Behavior> decisionInput_;

    /// <summary>
    /// decisionInputFlow
    /// An additional ActivityEdge incoming to the DecisionNode that provides a decision
    /// input value for the guards ValueSpecifications on ActivityEdges outgoing from
    /// the DecisionNode.
    /// </summary>
    shared_ptr<ObjectFlow> decisionInputFlow_;

};

} // namespace uml
